package com.five.welcome.dao;

import com.five.welcome.entity.Studentbd;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.five.welcome.entity.statistic.HaveBD;
import jakarta.xml.bind.annotation.XmlAnyElement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ywt
 * @since 2024-07-27
 */
@Mapper
public interface StudentbdMapper extends BaseMapper<Studentbd> {

    @Select("SELECT (SELECT COUNT(*) FROM studentbd WHERE have_bd = 0) AS un_bded," +
            "(SELECT COUNT(*) FROM studentbd WHERE have_bd = 1) AS bded;")
    HaveBD BDStatistic();
}
